package ttu.idu0080.courierService_client_test;

import ttu.idu0080.courierService_client.Courier;
import ttu.idu0080.courierService_client.CourierService_CourierServicePort_Client;
import ttu.idu0080.ryhm103_courierService.CourierServiceImpl;

public class Testing {

	public static void main(String[] args) throws Exception {
		CourierService_CourierServicePort_Client couriersClient=new CourierService_CourierServicePort_Client();
		CourierServiceImpl couriers=new CourierServiceImpl();
		for(Courier c: couriers.getAllCouriers()){
			System.out.println(c.getName());
		}
		
		try{
			System.out.println(couriersClient.getCourierByID(2).getName());
		}catch(NullPointerException n){
			System.out.println("Sellist kullerit ei ole");
		}
	}
}
